Repository navigation
feat(pivot-grid): add EV charging network sample - #4090
sdimchevski wants to merge 8 commits into
Conversation
Adds a pivot grid sample built from the "EV Charging Network Performance" Figma design, in two routes: - pivot-grid-ev-charging: the full story (saved views, KPI cards, power tier quick filters, Excel export). - pivot-grid-ev-charging-docs: the grid only, for the Pivot Grid docs page. Everything uses public API: IPivotValue.styles for data bars, heatmap and status pills, filterDimension for the chips, igx-grid-toolbar for the Reset / Legend / Fields actions, igx-pivot-data-selector for the field list. Colours are theme tokens, so the sample follows the docs theme switcher. Dates are relative to today (last complete quarter). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QY5WYFKgexC47HYv1kcwNi
Replaces the hard-coded #fff (350 kW chip text, <93% heatmap text) with the palette's -contrast tokens, drops the hex fallbacks, and sets the sample's text colour (legend header, heatmap legend) from --ig-gray-900 instead of inheriting the page colour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QY5WYFKgexC47HYv1kcwNi
…yles - Selected power tier chips use their shade's contrast colour, so they stay readable in dark themes. - Reset, Legend and See vendors keep primary text and primary state tints in every state. - Cell styles select the IPivotValue.styles classes without the grid's internal classes; the header, buttons and icons go through public --ig-* tokens. - Status and trend marks carry alt text for screen readers. - Rules that never applied are removed and split rules are merged.
|
@sdimchevski I pushed one commit to this branch (cfebeaa). It changes only Why
Changes
How it was checked
Not changed, needs your callThese fail WCAG AA contrast (4.5:1) and are the same in the original:
The 8.3:1 and 4.9:1 in the stylesheet comment hold for Indigo light only; I scoped the comment to that. Fixing these like the chips (contrast tokens) turns the coloured badge text black or white, so the design call is yours. |
|
@sdimchevski, @skrustev one structural suggestion, separate from the styling commit. The docs sample (
The live-editing config for the docs sample lists all of these files, so a reader who opens the docs sample's code gets the header, KPI and chip code that the page never shows. Suggestion: split it into two components.
The |
- Heatmap shades, status pills and KPI change badges use each shade's -contrast token for text (4.75:1 or more in all 8 themes; gray-900 and the coloured 500/800/900 text shades failed in dark, Material or Fluent). - Secondary text (KPI labels, units, legend units, under-used values) goes from gray-600 to gray-700 (3.35:1 to 6:1 or more in the light themes). - Over-threshold utilization keeps the orange bar, the value text stays default (warn-900 text was 1.4:1 in dark themes). - Page title and KPI values use fixed sizes instead of h3/h2 tokens, which are twice as large in Material and Fluent and cut the energy value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QY5WYFKgexC47HYv1kcwNi
The red value (error-500) was 2.2-2.8:1 in Fluent and Indigo dark. The error state stays visible through the red accent bar and the change badge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QY5WYFKgexC47HYv1kcwNi
The button had a custom primary-50 background when the data selector was open, a state the outlined button does not have (and 1.3:1 text in dark themes). The open panel shows the state; aria-pressed still reports it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QY5WYFKgexC47HYv1kcwNi
The value no longer turns red, so error cards also take error-500 as the card outline (--ig-card-outline-color), next to the existing left accent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QY5WYFKgexC47HYv1kcwNi
The Fluent palette has no pale tints (success-50 and error-50 are its most saturated shades, warn is gray), so the heatmap, the change badges and the "target missed" pill came out neon there. Fluent-only rules, scoped with @container style(--ig-theme: fluent): 99%+ gets no fill, missed targets take error-200 and error-900, badges and the pill take the 500 shades with their contrast text. The other themes are unchanged. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QY5WYFKgexC47HYv1kcwNi
|
@desig9stein Thanks for the fixes! On top of them: contrast fixes for all 8 themes, a neutral KPI value with a red card outline for errors, a plain outlined FIELDS button, and calmer Fluent-only colours via container style(--ig-theme: fluent). |
Pivot Grid: EV charging network sample
A new pivot grid sample, built from the "EV Charging Network Performance" design in Figma, in two routes:
pivot-grid-ev-charging: the full sample, with three saved views (Network overview, Tessera uptime by month, Motorway weekends), KPI cards, quick filter chips by power tier, and Excel export.pivot-grid-ev-charging-docs: the grid only, proposed for the Pivot Grid docs page (1100 px column).Public API only
IPivotValue.styles+ CSS:filterDimension().igx-grid-toolbar(title + actions). FIELDS toggles anigx-pivot-data-selectornext to the grid.prefers-reduced-motion).--ig-size: smallon the grid and data selector.var(--ig-…)palette tokens, so the sample follows the docs theme switcher.Data
src/app/data/ev-charging-data.ts: generated, flat records for 212 sites in 8 countries.Notes for review
ViewEncapsulation.None, because theIPivotValue.stylesclasses land on the grid's own cells. Every rule is scoped underapp-pivot-ev-charging.src/assets/fonts), because Windows has no flag emoji glyphs.ng buildin my environment because it ran out of memory. The sample was built and checked in a standalone app with the same Ignite UI version: no console errors, ESLint clean.Figma: https://www.figma.com/design/9aNkFlSlD9IPOICQ3E7NcY